package com.online_vote_system.demo.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.online_vote_system.demo.mapper.VoteMapper;
import com.online_vote_system.demo.vo.Vote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VoteServiceImpl extends ServiceImpl<VoteMapper, Vote> implements VoteService {

    @Autowired
    VoteMapper voteMapper;

    @Override
    public void doVote(String comId, String fg) {
        voteMapper.doVote(comId,fg);
    }

    @Override
    public void insertVote(String comId, String audId) {
        voteMapper.insertVote(comId,audId);
    }

    @Override
    public Vote findOne(String audId,String comId) {
        return voteMapper.findOne(audId,comId);
    }
}
